package com.battcn.platform.mapper.crow.movie;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.alibaba.fastjson.JSONObject;
import com.battcn.platform.entity.crow.movie.Actor;
import com.battcn.platform.entity.crow.movie.Director;
import com.battcn.platform.entity.crow.movie.Movie;
import com.battcn.platform.entity.crow.movie.MovieExample;

public interface MovieMapper {
    int countByExample(MovieExample example);

    int deleteByExample(MovieExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Movie record);

    int insertSelective(Movie record);

    List<Movie> selectByExampleWithBLOBs(MovieExample example);

    List<Movie> selectByExample(MovieExample example);

    Movie selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Movie record, @Param("example") MovieExample example);

    int updateByExampleWithBLOBs(@Param("record") Movie record, @Param("example") MovieExample example);

    int updateByExample(@Param("record") Movie record, @Param("example") MovieExample example);

    int updateByPrimaryKeySelective(Movie record);

    int updateByPrimaryKeyWithBLOBs(Movie record);

    int updateByPrimaryKey(Movie record);
    
    List<String> selectNameByMovies(@Param("movieids")String[] movieids);
    //电影年份统计
    List<JSONObject> selectMovieAnnee();
    
    //根据电影id查询演员数据
    List<Actor> selectActorById(@Param("movieid")Integer movieid);
    //根据电影id查询导演
    List<Director> selectDirectorById(@Param("movieid")Integer movieid);
}